<?php
/**
 * Hesperos libraries
 *
 * @author       Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright    Copyright (c) 2011 Krzysztof Kardasz
 * @category     Hesperos
 * @package      Model
 * @subpackage   Gateway
 * @version 	 SVN: $Id$
 * @filesource
 */

/**
 * Table data gateway
 *
 * @author       Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright    Copyright (c) 2011 Krzysztof Kardasz
 * @category     Hesperos
 * @package      Model
 * @subpackage   Gateway
 */
abstract class Hesperos_Model_Gateway_Table extends Zend_Db_Table_Abstract implements Hesperos_Model_DataSource_iDataBase
{
    /**
     * The schema name (default null means current schema)
     *
     * @see Zend_Db_Table_Abstract
     * @var array
     */
    protected $_schema = null;

    /**
     * The table name.
     *
     * @see Zend_Db_Table_Abstract
     * @var string
     */
    protected $_name = null;

    /**
     * The primary key column or columns.
     * A compound key should be declared as an array.
     * You may declare a single-column primary key
     * as a string.
     *
     * @see Zend_Db_Table_Abstract
     * @var mixed
     */
    protected $_primary = null;

    /**
     * Define the logic for new values in the primary key.
     * May be a string, boolean true, or boolean false.
     *
     * @see Zend_Db_Table_Abstract
     * @var mixed
     */
    protected $_sequence = true;

    /**
     * Classname for row
     *
     * @see Zend_Db_Table_Abstract
     * @var string
     */
    protected $_rowClass = 'Hesperos_Model_Gateway_Row';

    /**
     * Classname for rowset
     *
     * @see Zend_Db_Table_Abstract
     * @var string
     */
    protected $_rowsetClass = 'Zend_Db_Table_Rowset';

    /**
     * Zwraca nazwę schematu
     *
     * @return null|string
     */
    final public function getSchemaName ()
    {
        return $this->_schema;
    }

    /**
     * Zwraca nazwę tabeli
     * 
     * @return null|string
     */
    final public function getTableName ()
    {
        return $this->_name;
    }
}